<div class="breadcrumb">
    <a href="/homepage.php" title="Annunci"><img src="/images/element/lips.png" width="35" height="24" border="0" align="absmiddle" />Annunci</a>
</div>
<br class="clearfloat" />
<div style="margin-top:10px;">
  <div>
	<?php
    while ($row = mysql_fetch_array($this->_res))
    {    
        $nome = stripslashes($row['nome']);
		
		if($nome=="")
			$nome = $row['username'];
			
		$user_id = $row['user_id'];
		$citta = $row['citta'];
		if($citta=="")
			$citta = "Italia";
			
		
		$nome_foto_principale = $row['nome_foto_principale'];
		$obj = new Main();
        $nome_url = $obj->CleanStringForUrl($nome);
		$citta_url = $obj->CleanStringForUrl($citta);
				
		switch ($row['sesso']) {
		case "D":
			$descrSessoSingolare = "Escort";
			if($row['tipo_class']=="L")
				$href = "/$user_id/annunci/luxury-escort/$citta_url/$nome_url";		
			else
				$href = "/$user_id/annunci/escort/$citta_url/$nome_url";
			break;
		case "U":
			$descrSessoSingolare = "Accompagnatore";
			$href = "/$user_id/annunci/accompagnatore/$citta_url/$nome_url";
			break;
		case "T":
			$descrSessoSingolare = "Trans";
			$href = "/$user_id/annunci/trans/$citta_url/$nome_url";
			break;   
		default:
			$descrSessoSingolare = "Escort";
			$href = "/$user_id/annunci/escort/$citta_url/$nome_url";
		}
		
		$title = $nome." ".$descrSessoSingolare." ".$row['citta'];
		
		switch ($row['tipo_class']) {
		case "T":
			$class_box = "boxgrid2topclass caption2";
			$class_box_cover = "cover boxcaption2topclass";	
			$icons = "/images/element/heartz.png";			
			break;
		case "L":
			$class_box = "boxgrid2luxury caption2";
			$class_box_cover = "cover boxcaption2luxury";
			$icons = "/images/element/starz.png";					
			break;
		default:
			$class_box = "boxgrid2 caption2";
			$class_box_cover = "cover boxcaption2";	
			$icons = "/images/element/ribbonz.png";	
		}
		//die($class_box);
		?>
        
			<div class="<?=$class_box?>">
				<a href="<?=$href; ?>"><img src="/images/users/box/<?=$nome_foto_principale?>" width="110px" title="<?=$title?>" ></a>
				<div class="<?=$class_box_cover?>" style="top: 124px;">
					<h4><img src="<?=$icons?>"><a href="<?=$href; ?>"><?=$nome?></a></h4>
					<p><?=$citta?></p>
				</div>		
			</div>
        <?		
    }
    mysql_free_result($this->_res);    
	?>
	</div>
</div>    